package com.partsoft.dits.ldap;

import javax.naming.directory.DirContext;

/**
 * LDAP上下文获取器
 */
public interface LdapContextProvider {

	DirContext getLdapContext(LdapContextDescriptor desc) throws RuntimeException;

	DirContext getLdapContext(String id) throws RuntimeException;
	
	/**
	 * 判断是否有此Ldap上下文
	 * @param desc
	 * @return
	 */
	boolean hasLdapContext(LdapContextDescriptor desc);

	/**
	 * 判断是否有此Ldap上下文
	 * @param id
	 * @return
	 */
	boolean hasLdapContext(String id);
}
